package myJs.myPkg.tabs

import myJs.Implicits.JDJAn
import slinky.core._
import slinky.core.annotations.react
import slinky.readwrite.ObjectOrWritten

import scala.scalajs.js
import scala.scalajs.js.annotation.JSImport

/**
 * Created by yz on 28/3/2022
 */

@JSImport("react-bootstrap", JSImport.Default)
@js.native
object ReactBootstrapTabs extends js.Object {

  val Tabs: js.Object = js.native

  val Tab: js.Object = js.native

}


@react object Tabs extends ExternalComponent {

  case class Props(
                    id: String,
                    defaultActiveKey: js.UndefOr[String] = js.undefined,
                    activeKey: String,
                    onSelect: String => Unit,
                    transition: Boolean = true,
                  )

  override val component = ReactBootstrapTabs.Tabs

}

@react object Tab extends ExternalComponent {

  case class Props(
                    eventKey: String,
                    title: String,
                    disabled: Boolean=false,
                  )

  override val component = ReactBootstrapTabs.Tab

}
